package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

/**
 * 说明:
 *
 * @author:SuZhongHe
 * @date:2023/3/7
 **/
public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("fos.txt",true);
       // String line="好好学习,天天向上";
      // byte[] bytes = line.getBytes(StandardCharsets.UTF_8);
      fos.write("好好学习天天向上".getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");
        fos.close();
    }
}
